package dletc.job;

import java.util.Scanner;

public class Test01 {
	
	// 使用字符数组保存原始字符，利用Random类生成随机索引。

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		System.out.print("录入的字符串：");
		String str = s.next();
		
		System.out.println(rever(str));

	}
	
	public static String rever(String str){
		
		String s = "";
		
		char[] charArray = str.toCharArray();
		
		for (int i = charArray.length - 1; i >= 0; i--) {
			
			s += charArray[i];
		}
		return s;
		
	} 

}
